import 'package:flu_framework/common/widgets/CustomButton.dart';
import 'package:flutter/material.dart';

class XDNeedLoginPlaceholderWidget extends StatelessWidget {
  final double offsetTop;
  final Function? onPressed;
  const XDNeedLoginPlaceholderWidget({
    Key? key,
    this.offsetTop = 100,
    this.onPressed,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisSize: MainAxisSize.min,
        children: [
          SizedBox(height: offsetTop,),
          Image.asset("images/need_login_icon.png",fit: BoxFit.cover,),
          SizedBox(height: 20,),
          Text("请登录后查看您的课程表",style: TextStyle(
            fontSize: 14,
            color: Color(0xFF333333),
          ),),
          SizedBox(height: 20,),
          CustomButton(
            title: "登录",
            fontSize: 18,
            positionType: CustomButtonTitleImagePosition.onlyTitle,
            width: 80,
            height: 36,
            backgroundColor: Color(0xFFFB1B1B),
            borderRadius: BorderRadius.circular(6),
            onPressed: (ctx, btn){
              if(onPressed != null) onPressed!();
            },
          ),
          SizedBox(height: 30,),
        ],
      ),
    );
  }
}
